using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Slobby.Client.UI.Controls {
    public partial class TopBar : UserControl {
        public TopBar() {
            InitializeComponent();
        }

        public event EventHandler HostClicked;

        public bool EnableLobbyButton {
            set {
                btnLobby.Enabled = value;
            }
        }

        public bool ShowLoggedInControls {
            set {
                btnChat.Visible = value;
                btnJoin.Visible = value;
                btnHost.Visible = value;
                btnLobby.Visible = value;
            }
        }

        private void btnHelp_ButtonClick(object sender, EventArgs e) {
            btnHelp.ShowDropDown();
        }

        private void helpWebsite_Click(object sender, EventArgs e) {
            Program.OpenBrowser(Properties.Resources.SiteUrl);
        }

        private void helpBugReport_Click(object sender, EventArgs e) {
            Program.OpenBrowser(Properties.Resources.BugUrl);
        }

        private void helpContents_Click(object sender, EventArgs e) {
            Program.OpenBrowser(Properties.Resources.HelpUrl);
        }

        private void btnHost_Click(object sender, EventArgs e) {
            HostClicked(this, new EventArgs());
        }
    }
}
